package org.example.model.mapper;

import org.apache.ibatis.annotations.Param;
import org.example.model.entity.Strategy;

import java.util.List;

public interface StrategyMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Strategy record);

    int insertSelective(Strategy record);

    Strategy selectByPrimaryKey( Integer id);

    int updateByPrimaryKeySelective(Strategy record);

    int updateByPrimaryKey(Strategy record);

    // todo：StrategyMapper
    List<Strategy> selectAll();

    // 需要与product表进行表连接，填充Strategy中的productName属性
    Strategy selectById(@Param("id") Integer id);

    // 库存减一
    int updateStrategy(@Param("id") Integer id);
}